<!DOCTYPE html>
<html>
	{include file="head.html"}
 
	<body>
		<ul class="nav nav-tabs">
			<li>
				<a href="{$appadmin}?m=uicompent">组件管理</a>
			</li>
			<li class="active">
				<a href="{$appadmin}?m=uicompent&a=add">组件添加</a>
			</li>
		</ul>
		<div class="rbox">
			<form action="/admin.php?m=uicompent&a=save">
				<input type="hidden" name="id" value="{$data.id}" />
				<table class="table table-add">
					<tr>
						<td width="100">名称</td>
						<td>
							<input type="text" name="title" value="{$data.title}" class="w98" />
						</td>
					</tr>
					<tr>
						<td>类型</td>
						<td>
							<input type="radio" name="typeid" value="1" {if $data.typeid neq 2} checked {/if} /> 静态
							<input type="radio" name="typeid" value="2" {if $data.typeid eq 2} checked {/if} /> 动态
						 
						</td>
					</tr>
					<tr>
						<td>函数类型</td>
						<td>
							<input type="text" name="funtype" value="{$data.funtype}" />
						</td>	
					</tr>
					<tr>
						<td>描述</td>
						<td>
							<textarea name="description" style="width: 98%; height: 60px;">{$data.description}</textarea>
							
						</td>
					</tr>
					
					<tr>
    <td align="right">图片：</td>
    <td>
    <div id="up1" url="/index.php?m=upload&a=uploadtao&dir=article&id={$data.id}">
    	<div class="btn-upload">
         
          <input type="file" name="upimg" id="ud"  class="btn-upload-file" onChange="uploadimg('up1')">
         </div>
 
          <input type="hidden" name="imgurl" class="imgurl" value="{$data.imgurl}">
          <span class="imgShow">
          {if $data.imgurl}
          <img src="{$data.imgurl|images_site}.100x100.jpg">
          {/if}
          </span>
      </div>
      </td>
  </tr>
					
					<tr>
						<td>json配置</td>
						<td>
							<textarea name="jsondata" style="width: 98%; height: 200px;">{$data.jsondata}</textarea>
							
						</td>
					</tr>
					<tr>
						<td>模板文件</td>
						<td>
							<input type="text" name="tpl" value="{$data.tpl}" class="w98" />
						</td>	
					</tr>
					 
					<tr>
						<td></td>
						<td><div class="btn btn-success js-submit">保存</div></td>
					</tr>
				</table>
				 
				
			</form>
		</div>
		{include file="footer.html"}
	<script language="javascript" src="/plugin/jquery/ajaxfileupload.js"></script>
<script language="javascript" src="/static/js/upload.js"></script>	
	</body>

</html>